﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using GaiNo.Core.Data;
using GaiNo.WS.Core.Models;
using GaiNo.Core.Extensions;
namespace GaiNo.WS.Core.Services
{
    public class Site : ISite
    {
        #region ISite 成员

        public SiteEntity GetByID(int id)
        {
            string sql = "select * from site where UId={0}".FormatString(id.ToString());
            using (IDataReader reader = SqlHelper.ExecuteReader(sql))
                if (reader.Read())
                    return SiteEntityBind.ReaderBind(reader);
            return null;
        }

        #endregion
    }
}


